// 验证 QQ 邮箱的正则表达式
export const qqEmailRule = /^[\w-]+(\.[\w-]+)*@qq\.com$/;

// 验证函数
export const isQQEmail = (email: string): boolean => {
  const regex = new RegExp(qqEmailRule);
  return regex.test(email);
};



// 示例用法 const dateTime = getCurrentDateTime(); console.log(dateTime); // 输出类似于 '2022-01-01 12:30' 的时间字符串
export const getCurrentDateTime = () => {
  const date = new Date();
  const year = date.getFullYear();
  const month = String(date.getMonth() + 1).padStart(2, '0');
  const day = String(date.getDate()).padStart(2, '0');
  const hours = String(date.getHours()).padStart(2, '0');
  const minutes = String(date.getMinutes()).padStart(2, '0');
  return `${year}-${month}-${day} ${hours}:${minutes}`;
}
